<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0,viewport-fit=cover"><title>CSS基础学习（1） | SuperXCR</title><meta name="author" content="SuperXCR"><meta name="copyright" content="SuperXCR"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="认识学习CSS1-1 HTML内部添加样式添加声明 1&lt;input type&#x3D;&quot;text&quot; placeholder&#x3D;&quot;手机号码&quot; style&#x3D;&quot;&quot;&gt; 1-2 字体大小&#x2F;字体粗细CSS中，样式是由属性 和 值 组成 格式为 属性:值; 字体大小 格式  font-size:36px; 字体加粗 格式  font-weight:1">
<meta property="og:type" content="article">
<meta property="og:title" content="CSS基础学习（1）">
<meta property="og:url" content="https://liqur.xyz/SuperXCR/9a013174.html">
<meta property="og:site_name" content="SuperXCR">
<meta property="og:description" content="认识学习CSS1-1 HTML内部添加样式添加声明 1&lt;input type&#x3D;&quot;text&quot; placeholder&#x3D;&quot;手机号码&quot; style&#x3D;&quot;&quot;&gt; 1-2 字体大小&#x2F;字体粗细CSS中，样式是由属性 和 值 组成 格式为 属性:值; 字体大小 格式  font-size:36px; 字体加粗 格式  font-weight:1">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://liqur-1309874423.cos.ap-shanghai.myqcloud.com/s3.jpg">
<meta property="article:published_time" content="2022-09-01T02:00:01.000Z">
<meta property="article:modified_time" content="2022-09-15T13:50:34.401Z">
<meta property="article:author" content="SuperXCR">
<meta property="article:tag" content="CSS">
<meta property="article:tag" content="前端">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://liqur-1309874423.cos.ap-shanghai.myqcloud.com/s3.jpg"><link rel="shortcut icon" href="/img/favicon.png"><link rel="canonical" href="https://liqur.xyz/SuperXCR/9a013174.html"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: undefined,
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  dateSuffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isAnchor: false,
  percent: {
    toc: true,
    rightside: false,
  }
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'CSS基础学习（1）',
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2022-09-15 21:50:34'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
    win.getCSS = (url,id = false) => new Promise((resolve, reject) => {
      const link = document.createElement('link')
      link.rel = 'stylesheet'
      link.href = url
      if (id) link.id = id
      link.onerror = reject
      link.onload = link.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        link.onload = link.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(link)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><!-- hexo injector head_end start --><link rel="stylesheet" href="https://cdn.cbd.int/hexo-butterfly-clock-anzhiyu/lib/clock.min.css" /><link rel="stylesheet" href="https://cdn.cbd.int/hexo-butterfly-tag-plugins-plus@latest/lib/assets/font-awesome-animation.min.css" media="defer" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.cbd.int/hexo-butterfly-tag-plugins-plus@latest/lib/tag_plugins.css" media="defer" onload="this.media='all'"><script src="https://cdn.cbd.int/hexo-butterfly-tag-plugins-plus@latest/lib/assets/carousel-touch.js"></script><!-- hexo injector head_end end --><meta name="generator" content="Hexo 5.4.2"></head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">16</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">15</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">8</div></a></div><hr/></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('https://liqur-1309874423.cos.ap-shanghai.myqcloud.com/s3.jpg')"><nav id="nav"><span id="blog-info"><a href="/" title="SuperXCR"><span class="site-name">SuperXCR</span></a></span><div id="menus"><div id="toggle-menu"><a class="site-page" href="javascript:void(0);"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">CSS基础学习（1）</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2022-09-01T02:00:01.000Z" title="发表于 2022-09-01 10:00:01">2022-09-01</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2022-09-15T13:50:34.401Z" title="更新于 2022-09-15 21:50:34">2022-09-15</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/CSS/">CSS</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="CSS基础学习（1）"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"><i class="fa-solid fa-spinner fa-spin"></i></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h3 id="认识学习CSS"><a href="#认识学习CSS" class="headerlink" title="认识学习CSS"></a>认识学习CSS</h3><h4 id="1-1-HTML内部添加样式"><a href="#1-1-HTML内部添加样式" class="headerlink" title="1-1 HTML内部添加样式"></a>1-1 HTML内部添加样式</h4><p>添加声明</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;text&quot;</span> <span class="attr">placeholder</span>=<span class="string">&quot;手机号码&quot;</span> <span class="attr">style</span>=<span class="string">&quot;&quot;</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h4 id="1-2-字体大小-字体粗细"><a href="#1-2-字体大小-字体粗细" class="headerlink" title="1-2 字体大小/字体粗细"></a>1-2 字体大小/字体粗细</h4><p>CSS中，样式是由<strong>属性</strong> 和 <strong>值</strong> 组成</p>
<p>格式为 属性:值;</p>
<p><strong>字体大小</strong></p>
<p>格式  font-size:36px;</p>
<p><strong>字体加粗</strong></p>
<p>格式  font-weight:100;</p>
<p>400—&gt;normal(正常粗细)    200—&gt;lighter(细)  700—&gt;bold </p>
<h4 id="1-3-字体颜色-文字间对其方式"><a href="#1-3-字体颜色-文字间对其方式" class="headerlink" title="1-3 字体颜色/文字间对其方式"></a>1-3 字体颜色/文字间对其方式</h4><p><strong>颜色</strong></p>
<p><strong>1、英文字母</strong></p>
<p>如color: black;  color: blue; color: red;</p>
<p><strong>2、十六进制颜色</strong></p>
<p>由<strong>#</strong>开头每个数字范围为00-FF</p>
<p>如color: #DAE8FC;  color: #D5E8D4;</p>
<p><strong>3、reb形式</strong></p>
<p>是由red、green、blue三者决定，每种颜色的范围为0~255</p>
<p>如color: rgb(253,217,106);</p>
<p><strong>4、rgba形式</strong></p>
<p>比rgbd多了个a,a是透明度Alpha，a在0-1之间   0.4可以写成.4</p>
<p>如</p>
<p>color: rgba(253,217,106,1.0)</p>
<p>color: rgba(253,217,106,0.3);</p>
<p><strong>注意</strong></p>
<ol>
<li>建议使用十六进制表达方式</li>
<li>调试时可以用英文字母形式，初期的调试就是随便设置一个颜色，查看区块是否存在等，在合模型中我们会遇到</li>
<li>设置文字透明度或者背景透明度，就用到rgba形式</li>
</ol>
<p><strong>文字居中/居左/居右</strong></p>
<p>设置文字对齐格式</p>
<ul>
<li>text-align: center; 文字居中对齐</li>
<li>text-align: left;文字左对齐</li>
<li>text-align: right;文字右对齐</li>
</ul>
<h4 id="1-4-文字行高-字间距-字体"><a href="#1-4-文字行高-字间距-字体" class="headerlink" title="1-4 文字行高/字间距/字体"></a>1-4 文字行高/字间距/字体</h4><p><strong>行高</strong></p>
<p>行高的设置格式：line-height: 30px;</p>
<p>作用：1、改变段落中行与行之间的距离</p>
<p>​            2、<strong>使文字上下居中</strong>，先写text-align: center; 再将line-height设置与height设置一致</p>
<p><strong>字间距</strong></p>
<p>指的是 字母与字母之间，文字与文字之间设置字间距的格式：letter-spacing: 30px;</p>
<p><strong>字体</strong> </p>
<p>如宋体、隶书等</p>
<p>设置字体方式  关键字+值</p>
<p>font-family: sans-serif;</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">font-family: &#x27;Goudy Bookletter 1911&#x27;, sans-serif, &#x27;Gill Sans Extrabold&#x27;;</span><br></pre></td></tr></table></figure>
<p>电脑加载时会从第一个字体开始找，第一个没有依次往后找</p>
<p>字体写法注意事项：</p>
<ul>
<li>多个字体之间用英文逗号 , 隔开</li>
<li>字体名称见有空格时，要加引号，单引号双引号都可以</li>
<li>中文字体名称要用空格：”宋体”</li>
</ul>
<h4 id="2-1-CSS的三种引入方式"><a href="#2-1-CSS的三种引入方式" class="headerlink" title="2-1 CSS的三种引入方式"></a>2-1 CSS的三种引入方式</h4><p><strong>行内样式</strong></p>
<p>为了减少标签数量，做到简洁化，引入<strong>内部样式</strong></p>
<p><strong>内部样式</strong></p>
<ol>
<li>将CSS样式抽出来</li>
<li>在head标签里声明一个&lt; style&gt;&lt; /style&gt; 标签</li>
<li>将样式放到 style 标签里面</li>
<li>相同的标签，写在相同的大括号里面 {},大括号前加上标签名</li>
</ol>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">&lt;style&gt;</span><br><span class="line"><span class="selector-tag">p</span>&#123;</span><br><span class="line">    <span class="attribute">font-size</span>: <span class="number">16px</span>;</span><br><span class="line">    <span class="attribute">color</span>: <span class="number">#FFFFFF</span>;</span><br><span class="line">&#125;</span><br><span class="line">&lt;/style&gt;</span><br></pre></td></tr></table></figure>
<p><strong>外部样式</strong></p>
<p>当添加样式标签较多时，会出现头重脚轻</p>
<p><strong>引入css存放样式代码</strong></p>
<ol>
<li>建一个index.css文件</li>
<li>写入&lt; style&gt;</li>
<li>建立HTML和CSS文件的联系，即是 link标签引入CSS文件</li>
</ol>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">link</span> <span class="attr">rel</span>=<span class="string">&quot;stylesheet&quot;</span> <span class="attr">type</span>=<span class="string">&quot;text/css&quot;</span> <span class="attr">href</span>=<span class="string">&quot;index.css&quot;</span> /&gt;</span></span><br></pre></td></tr></table></figure>
<p><strong>补充知识</strong></p>
<p>CSS<strong>内部注释</strong>为 </p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">/*   */</span><br></pre></td></tr></table></figure>
<p><strong>外部注释</strong> 直接在.css文件中注释</p>
<p><strong>link</strong></p>
<ol>
<li><code>rel</code>属性 <code>rel</code>属性规定了当前文档与被链接文档之间的关系，但是<code>rel</code>属性的<code>stylesheet</code>值被所有浏览器支持，也就是说你只要记住一个值即可。</li>
</ol>
<p><code>stylesheet</code>的意思就是文档的外部样式表。</p>
<p>   2.<code>type</code>属性 <code>type</code>属性规定了被链接文档的 MIME（多用途互联网邮件扩展类型）类型，<code>type</code>属性对应的最常见的值就是<code>text/css</code>，该类型描述样式表.</p>
<p>   3.href<code>属性</code>href 属性后跟的要引入的链接地址</p>
<h4 id="2-2-相对路径-绝对路径"><a href="#2-2-相对路径-绝对路径" class="headerlink" title="2-2 相对路径/绝对路径"></a>2-2 相对路径/绝对路径</h4><p><strong>绝对路径</strong></p>
<p>如一张图片位置(明确位置)</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">img</span> <span class="attr">src</span>=<span class="string">&quot;E:\book\网页布局\bg.jpg&quot;</span> /&gt;</span></span><br></pre></td></tr></table></figure>
<p><strong>相对路径</strong></p>
<p>定义:所谓相对路径就是相对于文件自身位置，去寻找要引入的资源文件</p>
<p>text文件下有index.html 和 index.css</p>
<p>当前在index.html引入index.css就要用   ./当前文件夹目录</p>
<p>../:回到上一级文件夹目录</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">../返回上一层，如果有多层就用多个../</span><br><span class="line"></span><br><span class="line">css/表示进入css文件</span><br></pre></td></tr></table></figure>
<h4 id="2-3-常用选择器"><a href="#2-3-常用选择器" class="headerlink" title="2-3 常用选择器"></a>2-3 常用选择器</h4><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">标签选择器</span><br><span class="line"></span><br><span class="line">即定义一次，多次使用</span><br><span class="line">分为原始样式 内部样式 外部样式</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">选择器的层叠性</span><br><span class="line">在一次标签后，继续添加标签会覆盖前一个标签</span><br><span class="line"></span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p><strong>类选择器</strong></p>
<p>给一段文字赋予特定的属性</p>
<p><strong>定义</strong></p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">p</span> <span class="attr">class</span>=<span class="string">&quot;article&quot;</span>&gt;</span></span><br><span class="line">    class是定义类的关键字，article是类名，类名可以任意，但是要符合规范</span><br><span class="line"><span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p><strong>使用</strong></p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">.article &#123;</span><br><span class="line">	color: red;</span><br><span class="line">	font-size: 14px;</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p>内部样式要写在&lt; style&gt; &lt; /style&gt;之间</p>
<p>外部样式直接写在.css文件</p>
<p>一个标签可以添加多个类名，类名间用空格</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">p</span> <span class="attr">class</span>=<span class="string">&quot;common color font-size&quot;</span>&gt;</span></span><br><span class="line">  common设置通用样式，color设置特殊颜色，font-size设置特殊字体大小</span><br><span class="line"><span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p><strong>id选择器</strong></p>
<p><strong>定义</strong></p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">p</span> <span class="attr">id</span>=<span class="string">&quot;p-item&quot;</span>&gt;</span>这是一段文字<span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p><strong>用法</strong></p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">#p-item &#123;</span><br><span class="line">  font-size: 24px;</span><br><span class="line">  font-weight: 400;</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p>注意</p>
<p>1、id选择器只能出现一次</p>
<p>2、id只能有一个标签</p>
<h4 id="2-4-高级选择器"><a href="#2-4-高级选择器" class="headerlink" title="2-4 高级选择器"></a>2-4 高级选择器</h4><p>1.<strong>后代选择器</strong></p>
<p>p a —— 选择所有p标签内的所有a标签</p>
<p>书写规则：用空格隔开</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">/* 选择id名为password的标签内部所有类名为box的元素内部的所有p标签 */</span><br><span class="line">#password .box p&#123;&#125;</span><br><span class="line">/* 选择所有p标签内部的所有span标签 */</span><br><span class="line">p span&#123;&#125;</span><br><span class="line">/* 选择所有p标签内部的所有类名为spanItem的标签 */</span><br><span class="line">p .spanItem&#123;&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p>2.<strong>交集选择器</strong></p>
<p>书写规则</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">a.special&#123;&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span> <span class="attr">class</span>=<span class="string">&quot;special&quot;</span>&gt;</span>超链接<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span>&gt;</span>超链接<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span>&gt;</span>超链接<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span>&gt;</span>超链接<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p><strong>选中a中所有类名为special的标签</strong></p>
<p>3.<strong>子选择器</strong></p>
<p>后代选择器突出后代</p>
<p>子选择器突出是”子”</p>
<p><strong>代码对比</strong></p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">span &#123;</span><br><span class="line">    color: black;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">p span &#123;</span><br><span class="line">    color: orangered;</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">span &#123;</span><br><span class="line">    color: black;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">p&gt;span &#123;</span><br><span class="line">    color: orangered;</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p>4、<strong>并集选择器</strong></p>
<p>给不同的标签，或者不同的类名的标签添加相同的样式</p>
<p><strong>规则</strong> 在标签名后或者类名后用逗号隔开</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">.box,p,h3,.phone&#123;&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p>box和phone标签名为p、h3的标签添加相同的属性</p>
<h4 id="2-5-选择器的优先级"><a href="#2-5-选择器的优先级" class="headerlink" title="2-5 选择器的优先级"></a>2-5 选择器的优先级</h4><p><strong>单个选择器的优先级</strong> </p>
<p>​      <strong>id 选择器 &gt; 类选择器 &gt; 标签选择器</strong></p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">p &#123;</span><br><span class="line">  color: blue;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">.poem &#123;</span><br><span class="line">  color: red;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">#ch-poem &#123;</span><br><span class="line">  color: purple;</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p>最终颜色为  purple   <strong>是因为 id 选择器的优先级较高</strong></p>
<p><strong>文字属性的继承性</strong></p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">ul</span> <span class="attr">class</span>=<span class="string">&quot;ul-item&quot;</span>&gt;</span></span><br><span class="line">  蒹葭</span><br><span class="line">  <span class="tag">&lt;<span class="name">li</span>&gt;</span>蒹葭苍苍，白露为霜。所谓伊人，在水一方。<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">li</span>&gt;</span>溯洄从之，道阻且长。溯游从之，宛在水中央。<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">li</span>&gt;</span>蒹葭萋萋，白露未晞。所谓伊人，在水之湄。<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">ul</span>&gt;</span></span><br><span class="line"></span><br></pre></td></tr></table></figure>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">.ul-item &#123;</span><br><span class="line">  color: #ff6973;</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p><strong>全部变为红色，体现了文字属性的继承性</strong></p>
<h5 id="高级选择器的优先级"><a href="#高级选择器的优先级" class="headerlink" title="高级选择器的优先级"></a>高级选择器的优先级</h5><p><strong>权重方法</strong></p>
<p>可通过  <strong>id 选择器 &gt; 类选择器 &gt; 标签选择器</strong></p>
<p>也可假设 id 选择器 为100 类选择器为 10 标签选择器为 1；进行比较计算</p>
<p><strong>权重的作用</strong></p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">ul</span> <span class="attr">class</span>=<span class="string">&quot;ul-item&quot;</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">li</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">p</span>&gt;</span>文字的颜色到底是什么颜色？<span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">ul</span>&gt;</span></span><br><span class="line"></span><br></pre></td></tr></table></figure>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">ul li p &#123;</span><br><span class="line">  color: blue;</span><br><span class="line">&#125;</span><br><span class="line">p &#123;</span><br><span class="line">  color: red;</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p>第一个为 3 第二个为 1</p>
<p><strong>有的时候权重不起作用</strong></p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">.ul-item li &#123;</span><br><span class="line">  color: blue;</span><br><span class="line">&#125;</span><br><span class="line">p &#123;</span><br><span class="line">  color: red;</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p>由于第一个没有选中 P </p>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="https://liqur.xyz">SuperXCR</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://liqur.xyz/SuperXCR/9a013174.html">https://liqur.xyz/SuperXCR/9a013174.html</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://liqur.xyz" target="_blank">SuperXCR</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/CSS/">CSS</a><a class="post-meta__tags" href="/tags/%E5%89%8D%E7%AB%AF/">前端</a></div><div class="post_share"><div class="social-share" data-image="https://liqur-1309874423.cos.ap-shanghai.myqcloud.com/s3.jpg" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/butterfly-extsrc/sharejs/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/sharejs/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/SuperXCR/88b49e9a.html" title="CSS基础学习（2）"><img class="cover" src="https://liqur-1309874423.cos.ap-shanghai.myqcloud.com/sceney6.jpg" onerror="onerror=null;src='/img/404.jpg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">CSS基础学习（2）</div></div></a></div><div class="next-post pull-right"><a href="/SuperXCR/3ce8deb9.html" title="HTML基础学习"><img class="cover" src="https://liqur-1309874423.cos.ap-shanghai.myqcloud.com/h2.webp" onerror="onerror=null;src='/img/404.jpg'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">HTML基础学习</div></div></a></div></nav><div class="relatedPosts"><div class="headline"><i class="fas fa-thumbs-up fa-fw"></i><span>相关推荐</span></div><div class="relatedPosts-list"><div><a href="/SuperXCR/88b49e9a.html" title="CSS基础学习（2）"><img class="cover" src="https://liqur-1309874423.cos.ap-shanghai.myqcloud.com/sceney6.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2022-09-01</div><div class="title">CSS基础学习（2）</div></div></a></div><div><a href="/SuperXCR/3008f9ff.html" title="CSS基础学习（3）"><img class="cover" src="https://liqur-1309874423.cos.ap-shanghai.myqcloud.com/s11.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2022-09-01</div><div class="title">CSS基础学习（3）</div></div></a></div><div><a href="/SuperXCR/3ce8deb9.html" title="HTML基础学习"><img class="cover" src="https://liqur-1309874423.cos.ap-shanghai.myqcloud.com/h2.webp" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2022-09-01</div><div class="title">HTML基础学习</div></div></a></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">SuperXCR</div><div class="author-info__description">今日事，今日毕</div></div><div class="card-info-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">16</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">15</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">8</div></a></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/xxxxxx"><i class="fab fa-github"></i><span>Follow Me</span></a></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">This is my Blog</div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E8%AE%A4%E8%AF%86%E5%AD%A6%E4%B9%A0CSS"><span class="toc-number">1.</span> <span class="toc-text">认识学习CSS</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#1-1-HTML%E5%86%85%E9%83%A8%E6%B7%BB%E5%8A%A0%E6%A0%B7%E5%BC%8F"><span class="toc-number">1.1.</span> <span class="toc-text">1-1 HTML内部添加样式</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#1-2-%E5%AD%97%E4%BD%93%E5%A4%A7%E5%B0%8F-%E5%AD%97%E4%BD%93%E7%B2%97%E7%BB%86"><span class="toc-number">1.2.</span> <span class="toc-text">1-2 字体大小&#x2F;字体粗细</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#1-3-%E5%AD%97%E4%BD%93%E9%A2%9C%E8%89%B2-%E6%96%87%E5%AD%97%E9%97%B4%E5%AF%B9%E5%85%B6%E6%96%B9%E5%BC%8F"><span class="toc-number">1.3.</span> <span class="toc-text">1-3 字体颜色&#x2F;文字间对其方式</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#1-4-%E6%96%87%E5%AD%97%E8%A1%8C%E9%AB%98-%E5%AD%97%E9%97%B4%E8%B7%9D-%E5%AD%97%E4%BD%93"><span class="toc-number">1.4.</span> <span class="toc-text">1-4 文字行高&#x2F;字间距&#x2F;字体</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#2-1-CSS%E7%9A%84%E4%B8%89%E7%A7%8D%E5%BC%95%E5%85%A5%E6%96%B9%E5%BC%8F"><span class="toc-number">1.5.</span> <span class="toc-text">2-1 CSS的三种引入方式</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#2-2-%E7%9B%B8%E5%AF%B9%E8%B7%AF%E5%BE%84-%E7%BB%9D%E5%AF%B9%E8%B7%AF%E5%BE%84"><span class="toc-number">1.6.</span> <span class="toc-text">2-2 相对路径&#x2F;绝对路径</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#2-3-%E5%B8%B8%E7%94%A8%E9%80%89%E6%8B%A9%E5%99%A8"><span class="toc-number">1.7.</span> <span class="toc-text">2-3 常用选择器</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#2-4-%E9%AB%98%E7%BA%A7%E9%80%89%E6%8B%A9%E5%99%A8"><span class="toc-number">1.8.</span> <span class="toc-text">2-4 高级选择器</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#2-5-%E9%80%89%E6%8B%A9%E5%99%A8%E7%9A%84%E4%BC%98%E5%85%88%E7%BA%A7"><span class="toc-number">1.9.</span> <span class="toc-text">2-5 选择器的优先级</span></a><ol class="toc-child"><li class="toc-item toc-level-5"><a class="toc-link" href="#%E9%AB%98%E7%BA%A7%E9%80%89%E6%8B%A9%E5%99%A8%E7%9A%84%E4%BC%98%E5%85%88%E7%BA%A7"><span class="toc-number">1.9.1.</span> <span class="toc-text">高级选择器的优先级</span></a></li></ol></li></ol></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/SuperXCR/7f8be62d.html" title="你不会还不会安装Maven吧"><img src="https://liqur-1309874423.cos.ap-shanghai.myqcloud.com/SuperXCR/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20230310162508.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="你不会还不会安装Maven吧"/></a><div class="content"><a class="title" href="/SuperXCR/7f8be62d.html" title="你不会还不会安装Maven吧">你不会还不会安装Maven吧</a><time datetime="2023-03-10T09:57:23.000Z" title="发表于 2023-03-10 17:57:23">2023-03-10</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/SuperXCR/c24675b4.html" title="MySQL"><img src="https://liqur-1309874423.cos.ap-shanghai.myqcloud.com/MySQL%E9%85%8D%E7%BD%AE/mysql.webp" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="MySQL"/></a><div class="content"><a class="title" href="/SuperXCR/c24675b4.html" title="MySQL">MySQL</a><time datetime="2022-11-21T06:48:00.000Z" title="发表于 2022-11-21 14:48:00">2022-11-21</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/SuperXCR/bfa56f5e.html" title="Navicat_Premium_16破解"><img src="https://liqur-1309874423.cos.ap-shanghai.myqcloud.com/s1.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Navicat_Premium_16破解"/></a><div class="content"><a class="title" href="/SuperXCR/bfa56f5e.html" title="Navicat_Premium_16破解">Navicat_Premium_16破解</a><time datetime="2022-09-26T02:55:58.000Z" title="发表于 2022-09-26 10:55:58">2022-09-26</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/SuperXCR/b2444a9.html" title="MySQL安装配置"><img src="https://liqur-1309874423.cos.ap-shanghai.myqcloud.com/MySQL%E9%85%8D%E7%BD%AE/mysql.webp" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="MySQL安装配置"/></a><div class="content"><a class="title" href="/SuperXCR/b2444a9.html" title="MySQL安装配置">MySQL安装配置</a><time datetime="2022-09-24T03:30:42.000Z" title="发表于 2022-09-24 11:30:42">2022-09-24</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/SuperXCR/a219e661.html" title="羊了个羊17最新版"><img src="https://liqur-1309874423.cos.ap-shanghai.myqcloud.com/s6.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="羊了个羊17最新版"/></a><div class="content"><a class="title" href="/SuperXCR/a219e661.html" title="羊了个羊17最新版">羊了个羊17最新版</a><time datetime="2022-09-16T05:18:03.000Z" title="发表于 2022-09-16 13:18:03">2022-09-16</time></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2023 By SuperXCR</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><button id="go-up" type="button" title="回到顶部"><span class="scroll-percent"></span><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.umd.min.js"></script><div class="js-pjax"></div><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div><!-- hexo injector body_end start --><script>
    // 全局变量声明区域
    var fdata = {
      apiurl: 'https://hexo-friendcircle-api-ai9d4hwad-anzhiyu-c.vercel.app/api',
      initnumber: 20, //【可选】页面初始化展示文章数量
      stepnumber: 10, //【可选】每次加载增加的篇数
      error_img: 'https://npm.elemecdn.com/akilar-candyassets/image/404.gif' //【可选，头像图片加载失败时的默认头像】
    }
    //存入本地存储
    localStorage.setItem("fdatalist",JSON.stringify(fdata))
    </script>
    <script defer src="https://npm.elemecdn.com/hexo-filter-fcircle/assets/js/fetch.min.js"></script><script data-pjax>
  function butterfly_clock_anzhiyu_injector_config(){
    var parent_div_git = document.getElementsByClassName('sticky_layout')[0];
    var item_html = '<div class="card-widget card-clock"><div class="card-glass"><div class="card-background"><div class="card-content"><div id="hexo_electric_clock"><img class="entered loading" id="card-clock-loading" src="https://cdn.cbd.int/hexo-butterfly-clock-anzhiyu/lib/loading.gif" style="height: 120px; width: 100%;" data-ll-status="loading"/></div></div></div></div></div>';
    console.log('已挂载butterfly_clock_anzhiyu')
    if(parent_div_git) {
      parent_div_git.insertAdjacentHTML("afterbegin",item_html)
    }
  }
  var elist = 'null'.split(',');
  var cpage = location.pathname;
  var epage = 'all';
  var qweather_key = 'b16a1fa0e63c46a4b8f28abfb06ae3fe';
  var gaud_map_key = 'e2b04289e870b005374ee030148d64fd&s=rsv3';
  var baidu_ak_key = 'undefined';
  var flag = 0;
  var clock_rectangle = '112.982279,28.19409';
  var clock_default_rectangle_enable = 'false';

  for (var i=0;i<elist.length;i++){
    if (cpage.includes(elist[i])){
      flag++;
    }
  }

  if ((epage ==='all')&&(flag == 0)){
    butterfly_clock_anzhiyu_injector_config();
  }
  else if (epage === cpage){
    butterfly_clock_anzhiyu_injector_config();
  }
  </script><script src="https://widget.qweather.net/simple/static/js/he-simple-common.js?v=2.0"></script><script data-pjax src="https://cdn.cbd.int/hexo-butterfly-clock-anzhiyu/lib/clock.min.js"></script><script async src="/js/ali_font.js"></script><!-- hexo injector body_end end --></body></html>